Hello. In this part, you will learn how to
mitigate unfairness with Fairlearn. In addition to enabling you to analyze
disparity in selection rates and predictive performance
across sensitive features. Fairlearn provides support for
mitigating unfairness in models. The mitigation support in Fairlearn
is based on the use of algorithms to create alternative models that apply
parity constraints to produce comparable metrics across sensitive feature groups. Fairlearn supports the following
mitigation techniques. Exponentiated gradient, which is
a reduction technique that applies a cost minimization approach to learning
the optimal trade off of overall predictive performance and
fairness disparity. Grid search, which is a simplified version
of the exponentiated gradient algorithm that works efficiently with
small numbers of constraints. And finally, threshold optimizer, which is
a post processing technique that applies a constraint to an existing classifier, transforming the prediction
as appropriate. It is important to note that
all three techniques support binary classification and regression. While threshold optimizer only supports
the binary classification model. The choice of parity constraint depends
on the technique being used and the specific fairness
criteria you want to apply. Constraints in Fairlearn
include demographic parity, true positive rate parity, false
positive rate parity, equalized odds, error rate parity and bounded group loss. Let's look at each of these
a little more closely now. Use the demographic parity constraint
with any of the mitigation algorithms to minimize disparity in the selection rate
across sensitive feature groups, for example, in a binary
classification scenario. This constraint tries to ensure that
an equal number of positive predictions are made in each group. Use the true positive rate parity
constraint with any of the mitigation algorithms to minimize disparity in
true positive rate across sensitive feature groups. For example, in a binary classification
scenario, this constraint tries to ensure that each group contains a comparable
ratio of true positive predictions. Use the false positive rate parity
constraint with any of the mitigation algorithms to minimize disparity in
false positive rate across sensitive feature groups. For example, in a binary classification
scenario, this constraint tries to ensure that each group contains a comparable
ratio of false positive predictions. Use this constraint with any
of the mitigation algorithms to minimize disparity in
combined true positive rate and false positive rate across
sensitive feature groups. For example,
in a binary classification scenario, this constraint tries to ensure that each
group contains a comparable ratio of true positive and
false positive predictions. Use the error rate parity constraint with
any of the reduction based mitigation algorithms exponentiated gradient and
grid search to ensure that the error for each sensitive feature group does not
deviate from the overall error rate by more than a specified amount. Finally, use the bounded group loss
constraint with any of the reduction based mitigation algorithms to
restrict the loss for each sensitive feature group
in a regression model. A common approach to mitigation is to use
one of the algorithms and constraints to train multiple models and then compare
their performance selection rate and disparity metrics to find
the optimal model for your needs. Often, the choice of the model involves
a trade off between raw predictive performance and fairness based on your definition
of fairness for a given scenario. Generally, fairness is measured by
a reduction in the disparity of feature selection. For example, ensuring that an equal
proportion of members from each gender group is approved for a bank loan or by a reduction in the disparity
of performance metric. For example, ensuring that a model is
equally accurate, identifying repairs and defaulters in each age group. Fairlearn enables you to
train mitigated models and visualize them using the dashboard. You can select an individual model in the
scatter plot to see its details, enabling you to explore the options and select the
best model for your fairness requirements. Just as when analyzing
an individual model, you can register all of the models found
during your mitigation testing and upload the dashboard metrics
to Azure machine learning